-- GENERATED SPELL FOR [Thunderhead Stagwing] --


function spell0_6377(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(12553,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6377', 0, 1)
end

function spell1_6377(pUnit, Event) --@Wing Flap,Self--
pUnit:FullCastSpellOnTarget(11019,pUnit)
pUnit:RegisterEvent('Sorts_6377', 544, 1)
end

function Sorts_6377(pUnit, Event)
local choix_sorts_6377 = math.random(0, 1)
if choix_sorts_6377 == 0 then
pUnit:RegisterEvent('spell0_6377', 1, 1)
end
if choix_sorts_6377 == 1 then
pUnit:RegisterEvent('spell1_6377', 1, 1)
end
end

function mob6377_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6377', math.random(1500, 3000), 1)
end

function mob6377_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6377_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6377_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6377, 1, 'mob6377_Action')
RegisterUnitEvent(6377, 2, 'mob6377_Leave')
RegisterUnitEvent(6377, 3, 'mob6377_Kill')
RegisterUnitEvent(6377, 4, 'mob6377_Die')
